Replication material for Leininger and Meijers (2020) "Do Populist Parties Increase Voter Turnout?", Political Studies
======================================================================================================================

These replication materials contain the necessary data and scripts to replicate the results presented in our article "Do Populist Parties Increase Voter Turnout?", to appear in Political Studies.

Arndt Leininger, arndt.leininger@fu-berlin.de
Maurits Meijers, M.Meijers@fm.ru.nl


Files
-----

(listed in alphabetical order)

- coefplots.R: produces the coefficients plots found in the paper and appendix; need to run models_paper_january2020.do first
- master.csv: dataset at party-election level
- master_elec.csv master dataset (elections) in CSV format
- master_elec.dta: master dataset (elections) in Stata format
- merge.R: produces master_elec.dta from partylist.xlsx and other third-party datasets
- models_appendix.do: produces additional tables presented in the appendix
- models_paper_january2020.do: contains the syntax for the statistical models presented in the paper and appendix
- models_paper_january2020_year.do: contains the syntax for the statistical models presented in the paper and appendix for subsetted samples (after 1990 or in fact any year of your choice)
- partylist.xlsx: list of parties obtained from ParlGov along with our own coding of populism based on extant literature
- populistparties.R: produces table of populist parties (Table A.2)
- t_countries_election_years.R: produces table of elections (Table A.1)
- README.txt: this file
- t_leaveoneout.R: works with output from models_paper_january2020_year.do to produce tables (Tables A.26 and A.27)
- t_pp_pr_lr.R: produces the tables on distribution of populist left and right parties
- t_pp_pr_lr_1990.R: produces the tables on distribution of populist left and right parties for sample year > 1990
- visualizations.R: produces Figure A.1

Tables and Figures
------------------

(In the following we list all tables and figures in the manuscript and appendix and state which script was used to produce them. Tables and Figures in the appendix are preceded by the letter A.)

- Table 1: models_paper_january2020.do
- Figure 1: coefplots.R
- Figure 2: coefplots.R
- Figure 3: coefplots.R
- Table A.1: t_countries_election_years.R
- Table A.2: populistparties.R
- Figure A.1: visualizations.R
- Table A.3: models_appendix.do
- Table A.4: created by hand from output generated by models in Table 1 (see models_paper_january2020.do)
- Table A.5: models_paper_january2020.do
- Table A.6: models_paper_january2020.do
- Table A.7: models_paper_january2020.do
- Table A.8: models_paper_january2020.do
- Table A.9: models_paper_january2020.do
- Table A.10: models_paper_january2020.do
- Table A.11: models_paper_january2020.do
- Figure A.2: coefplots.R
- Table A.12: models_paper_january2020.do
- Table A.13: models_paper_january2020.do
- Table A.14: models_paper_january2020.do
- Table A.15: models_paper_january2020.do
- Table A.16: t_pp_pr_lr.R
- Table A.17: t_pp_pr_lr.R
- Table A.18: t_pp_pr_lr.R
- Table A.19: models_paper_january2020.do
- Table A.20: models_paper_january2020.do
- Table A.21: models_paper_january2020.do
- Table A.22: models_paper_january2020.do
- Figure A.3: coefplots.R
- Table A.23: models_paper_january2020.do
- Table A.24: models_paper_january2020.do
- Table A.25: models_paper_january2020.do
- Table A.26: models_paper_january2020.do and then t_leaveoneout.R        
- Table A.27: models_paper_january2020.do and then t_leaveoneout.R
- Table A.28: models_paper_january2020_year.do
- Table A.29: models_paper_january2020_year.do
- Table A.30: models_paper_january2020_year.do
- Table A.31: models_paper_january2020_year.do 
- Table A.32: models_paper_january2020_year.do
- Table A.33: models_paper_january2020_year.do
- Table A.34: models_paper_january2020_year.do  
- Figure A.4: coefplots.R
- Figure A.5: coefplots.R
- Table A.35: models_paper_january2020_year.do 
- Table A.36: models_paper_january2020_year.do
- Table A.37: models_paper_january2020_year.do
- Table A.38: models_paper_january2020_year.do
- Table A.39: t_pp_pr_lr_1990.R
- Table A.40: t_pp_pr_lr_1990.R
- Table A.41: t_pp_pr_lr_1990.R
- Table A.42: models_paper_january2020_year.do
- Table A.43: models_paper_january2020_year.do
- Table A.44: models_paper_january2020_year.do 
- Table A.45: models_paper_january2020_year.do
- Figure A.6: coefplots.R
- Figure A.7: coefplots.R


Instructions for replication
----------------------------

0. NB: File paths in the scripts of course need to be adjusted to match the location of files on your hard drive.
1. To replicate our results you will first need to run the code in model_paper_january2020.do. Please see the instructions in the do-file for further guidance. Note that you need to manually change some parts of the code rerun it to produce the necessary files.
2. Install the required R packages if you do not have them installed on your machine before running coefplots.R. Run it twice. Once, with `year` set to ''. Once, with year set to '1990'.
3. Run populistparties.R to produce Table A.2 in appendix.
4. Run t_pp_pr_lr.R anf t_pp_pr_lr_1990.R to produce tables providing overview over left and right populist parties found in appendix.


Instructions for building the dataset
-------------------------------------

0. NB: File paths in the scripts of course need to be adjusted to match the location of files on your hard drive.
1. merge.R builds master_elec.dta from partylist.xlsx and several third-party datasets. These are not included in the replication materials because they are provided by third-parties freely on the web. You need to collect these datasets first before running the script.
2. Install the required R packages if you do not have them installed on your machine before running merge.R.
3. Run merge.R